﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:wpf="clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit"
                    xmlns:Common="clr-namespace:SolPowerTool.App.Common"
                    x:Class="SolPowerTool.App.Resources.d__codeplex_solpowertool_solutionpowertool_solpowertool_resources_resources_xaml">

    <BooleanToVisibilityConverter x:Key="booleanToVisibilityConverter" />
    <Common:EnumToInt32Converter x:Key="enumToInt32Converter" />
    <Common:RowDetailsVisibilityConverter x:Key="rowDetailsVisibilityConverter" />

    <Style x:Key="dirtyColorStyle"
           TargetType="{x:Type wpf:DataGridCell}">
        <Style.Triggers>
            <DataTrigger Binding="{Binding IsDirty}"
                         Value="True">
                <Setter Property="BorderBrush"
                        Value="Brown" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="problemHintPathColorStyle"
           TargetType="{x:Type wpf:DataGridCell}"
           BasedOn="{StaticResource ResourceKey=dirtyColorStyle}">
        <Style.Triggers>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding HasHintPath}"
                               Value="True" />
                    <Condition Binding="{Binding HasFile}"
                               Value="False" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Background"
                        Value="Pink" />
            </MultiDataTrigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="problemCodeAnalysisRuleSetColorStyle"
           TargetType="{x:Type wpf:DataGridCell}"
           BasedOn="{StaticResource ResourceKey=dirtyColorStyle}">
        <Style.Triggers>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding RunCodeAnalysis}"
                               Value="True" />
                    <Condition Binding="{Binding HasCodeAnalysisRuleSetFile}"
                               Value="False" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Background"
                        Value="Pink" />
            </MultiDataTrigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="problemMissingProjectFileColorStyle"
           TargetType="{x:Type wpf:DataGridCell}"
           BasedOn="{StaticResource ResourceKey=dirtyColorStyle}">
        <Style.Triggers>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding HasProjectFile}"
                               Value="False" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Background"
                        Value="Pink" />
            </MultiDataTrigger>
        </Style.Triggers>
    </Style>


</ResourceDictionary>